package com.wkh.datastructure.BinaryTree;

/**
 * 树的反转
 */
public class TreeReversal {
    public static void main(String[] args) {

    }

    /**
     * 树的反转
     * @param node
     */
    public static void fn(TreeNode node){
        if (node == null){
            return;
        }
        TreeNode t = node.left;
        node.left = node.right;
        node.right = t;

        fn(node.left);
        fn(node.right);
    }
}
